package com.tnmi.exception.code;

public enum ExceptionCode implements BaseExceptionCode{
    SUCCESS(200,"请求成功"),
    FATL(500,"请求失败"),

    ARITHMETICEXCEPTION(30001,"授权异常"),
    ;

    private int code;

    private String msg;

    ExceptionCode(int code,String msg){
        this.code = code;
        this.msg= msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
    public ExceptionCode build(String msg,Object... param){
        this.msg =String.format(msg,param);
        return this;
    }
    public ExceptionCode param(Object... param){
        msg = String .format(msg,param);
        return this;
    }
}
